package com.snack.shop.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 文件上传记录实体
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_file_record")
@Schema(description = "文件上传记录")
public class FileRecord extends BaseEntity {

    @Schema(description = "文件名")
    @TableField("file_name")
    @JsonProperty("fileName")
    private String fileName;

    @Schema(description = "文件相对路径")
    @TableField("file_path")
    @JsonProperty("filePath")
    private String filePath;

    @Schema(description = "文件访问URL")
    @TableField("file_url")
    @JsonProperty("fileUrl")
    private String fileUrl;

    @Schema(description = "文件大小(字节)")
    @TableField("file_size")
    @JsonProperty("fileSize")
    private Long fileSize;

    @Schema(description = "业务模块")
    @TableField("module")
    private String module;

    @Schema(description = "上传日期(yyyyMMdd)")
    @TableField("upload_date")
    @JsonProperty("uploadDate")
    private String uploadDate;

    @Schema(description = "状态：0-临时，1-正式，2-已删除")
    @TableField("status")
    private Integer status;

    @Schema(description = "关联业务类型")
    @TableField("ref_type")
    @JsonProperty("refType")
    private String refType;

    @Schema(description = "关联业务ID")
    @TableField("ref_id")
    @JsonProperty("refId")
    private Long refId;

    @Schema(description = "上传者ID")
    @TableField("uploader_id")
    @JsonProperty("uploaderId")
    private Long uploaderId;
}

